package com.ternnetwork.core.accesscontroll.service;

import com.ternnetwork.commons.model.http.BaseResponse;
import com.ternnetwork.core.accesscontroll.entity.Resources;
import com.ternnetwork.core.accesscontroll.enums.ResourcesType;

public interface ResourcesService {
	
	
	/**
	 * 添加
	 * @param t
	 * @return
	 */
	BaseResponse add(Resources t);
	
	/**
	 * 更新
	 * @param t
	 * @return
	 */
	BaseResponse update(Resources t);
	
	/**
	 * 删除
	 * @param id
	 * @return
	 */
	BaseResponse deleteById(Long id);
	
	
	/**
	 * 按资源类别获取ZTree数据
	 * @param resourcesType
	 * @return
	 */
	BaseResponse getZtreeJson(ResourcesType resourcesType);
	
	/**
	 * 按资源类型与用户名获取
	 * @param resourcesType
	 * @param userName
	 * @return
	 */
	BaseResponse getZtreeJson(ResourcesType resourcesType,String userName);
	
	/**
	 * 按资源类型与角色ID获取
	 * 与角色关联的为选中
	 * @param resourcesType
	 * @param roleId
	 * @return
	 */
	BaseResponse getAllWithCheckBoxZtreeJson(ResourcesType resourcesType,Long roleId);
	

}
